package com.facade.facade;

/**
 * 投影仪
 * 为了回顾以前的知识使用 懒汉式单例(同步方法)创建
 */
public class Projector {

    private static Projector projector  ;

    private Projector(){}

    public synchronized static Projector getInstance(){
        if (projector == null ){
            projector = new Projector();
        }
        return projector;
    }

    public void on(){
        System.out.println(" Projector  on ... ");
    }

    public void off(){
        System.out.println(" Projector  off ... ");
    }

    public void play(){
        System.out.println(" Projector  is showing  ... ");
    }

    public void pause(){
        System.out.println(" Projector  pause ... ");
    }

}
